package codeTop;

public class q55 {
    public boolean canJump(int[] nums) {
        int max = 0;
        int i;
        for (i = 0; i <=max ; i++) {
            max = Math.max(max,i+nums[i]);
            if (max >= nums.length - 1) {
                return true;
            }
        }
        return false;
    }
}
